package com.xuecheng.api.media;

import com.xuecheng.api.content.model.qo.QueryCourseModel;
import com.xuecheng.api.learning.model.vo.ResourceUrlModel;
import com.xuecheng.api.media.model.aliyun.VodUploadRequest;
import com.xuecheng.api.media.model.aliyun.VodUploadToken;
import com.xuecheng.api.media.model.dto.MediaDTO;
import com.xuecheng.api.media.model.qo.QueryMediaModel;
import com.xuecheng.api.media.model.vo.MediaVO;
import com.xuecheng.common.domain.page.PageRequestParams;
import com.xuecheng.common.domain.page.PageVO;
import com.xuecheng.common.domain.response.RestResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;

/**
 * <p>
 * 媒资管理 Api 接口
 * </p>
 *
 * @Description:
 */
@Api(value = "媒资管理 Api 接口", tags = "媒资-媒资管理业务服务 Api 接口", description = "媒资管理业务服务 Api 接口")
public interface MediaApi {

    @ApiOperation("创建媒资上传凭证")
    VodUploadToken createVODUploadToken(VodUploadRequest request);

    @ApiOperation("刷新视频上传凭证,为前端分片上传使用")
    VodUploadToken refreshVODUploadToken(String videoId);

    @ApiOperation("保存媒资信息")
    MediaDTO createMedia(MediaVO vo);

    @ApiOperation("分页条件查询媒资信息")
    PageVO queryMediaList(PageRequestParams params, QueryMediaModel model);

    @ApiOperation("获得媒资信息预览资源地址")
    @ApiImplicitParam(name = "mediaId", value = "媒资id值", required = true, dataType = "Long", paramType = "path")
    Object previewMedia(Long mediaId);

    @ApiOperation("删除媒资信息")
    void removeMedia(Long mediaId);

    @ApiOperation("根据id查询媒资信息")
    RestResponse<MediaDTO> getMediaById4s(Long mediaId);

    @ApiOperation(value = "根据媒资ID获取播放地址--远程调用")
    RestResponse<ResourceUrlModel> getMediaUrl(Long mediaId);
}
